home *** CD-ROM | disk | FTP | other *** search
/ C++ für Kids / C++ for kids.iso / SETUP / US / CBUILDER / DATA.Z / DSGNINTF.HPP < prev    next >
C/C++ Source or Header  |  1997-02-13  |  24KB  |  662 lines

  1. //----------------------------------------------------------------------------
  2. // DsgnIntf.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
  3. // From: DsgnIntf.pas
  4. //----------------------------------------------------------------------------
  5. #ifndef DsgnIntfHPP
  6. #define DsgnIntfHPP
  7. //----------------------------------------------------------------------------
  8. #include <TypInfo.hpp>
  9. #include <Forms.hpp>
  10. #include <Controls.hpp>
  11. #include <Graphics.hpp>
  12. #include <Classes.hpp>
  13. #include <SysUtils.hpp>
  14. #include <System.hpp>
  15. #pragma warn -par
  16. #pragma warn -hid 
  17. #pragma warn -inl
  18.  
  19. namespace Dsgnintf
  20. {
  21. //-- type declarations -------------------------------------------------------
  22. class __declspec(delphiclass) TComponentList;
  23. class __declspec(pascalimplementation) TComponentList : public System::TObject
  24. {
  25.     typedef System::TObject inherited;
  26.     
  27. private:
  28.     Classes::TList* FList;
  29.     Classes::TComponent* __fastcall Get(int Index);
  30.     int __fastcall GetCount(void);
  31.     
  32. public:
  33.     __fastcall TComponentList(void);
  34.     __fastcall virtual ~TComponentList(void);
  35.     int __fastcall Add(Classes::TComponent* Item);
  36.     bool __fastcall Equals(TComponentList* List);
  37.     __property int Count = {read=GetCount, nodefault};
  38.     __property Classes::TComponent* Items[int Index] = {read=Get/*, default*/};
  39. };
  40.  
  41. class __declspec(delphiclass) TFormDesigner;
  42. class __declspec(pascalimplementation) TFormDesigner : public Forms::TDesigner
  43. {
  44.     typedef Forms::TDesigner inherited;
  45.     
  46. public:
  47.     virtual Sysutils::TMethod __fastcall CreateMethod(const System::AnsiString Name, Typinfo::PTypeData 
  48.         TypeData) = 0;
  49.     virtual System::AnsiString __fastcall GetMethodName(const Sysutils::TMethod &Method) = 0;
  50.     virtual void __fastcall GetMethods(Typinfo::PTypeData TypeData, Classes::TGetStrProc Proc) = 0;
  51.     virtual System::AnsiString __fastcall GetPrivateDirectory(void) = 0;
  52.     virtual void __fastcall GetSelections(TComponentList* List) = 0;
  53.     virtual bool __fastcall MethodExists(const System::AnsiString Name) = 0;
  54.     virtual void __fastcall RenameMethod(const System::AnsiString CurName, const System::AnsiString NewName
  55.         ) = 0;
  56.     virtual void __fastcall SelectComponent(Classes::TComponent* Component) = 0;
  57.     virtual void __fastcall SetSelections(TComponentList* List) = 0;
  58.     virtual void __fastcall ShowMethod(const System::AnsiString Name) = 0;
  59.     virtual System::AnsiString __fastcall UniqueName(const System::AnsiString BaseName) = 0;
  60.     virtual void __fastcall GetComponentNames(Typinfo::PTypeData TypeData, Classes::TGetStrProc Proc) = 0
  61.         ;
  62.     virtual Classes::TComponent* __fastcall GetComponent(const System::AnsiString Name) = 0;
  63.     virtual System::AnsiString __fastcall GetComponentName(Classes::TComponent* Component) = 0;
  64.     virtual bool __fastcall MethodFromAncestor(const Sysutils::TMethod &Method) = 0;
  65.     virtual Classes::TComponent* __fastcall CreateComponent(System::TMetaClass* ComponentClass, Classes::TComponent* 
  66.         Parent, int Left, int Top, int Width, int Height) = 0;
  67.     virtual bool __fastcall IsComponentLinkable(Classes::TComponent* Component) = 0;
  68.     virtual void __fastcall MakeComponentLinkable(Classes::TComponent* Component) = 0;
  69.     virtual Classes::TComponent* __fastcall GetRoot(void) = 0;
  70.     virtual void __fastcall Revert(Classes::TPersistent* Instance, Typinfo::PPropInfo PropInfo) = 0;
  71. public:
  72.         
  73.     /* TObject.Create */ __fastcall TFormDesigner(void) : Forms::TDesigner() { }
  74.     /* TObject.Destroy */ __fastcall virtual ~TFormDesigner(void) { }
  75.     
  76. };
  77.  
  78. enum TPropertyAttribute { paValueList, paSubProperties, paDialog, paMultiSelect, paAutoUpdate, paSortList, 
  79.     paReadOnly, paRevertable };
  80.  
  81. typedef Set<TPropertyAttribute, paValueList, paRevertable>  TPropertyAttributes;
  82.  
  83. struct TInstProp
  84. {
  85.     Classes::TComponent* Instance;
  86.     Typinfo::TPropInfo *PropInfo;
  87. } ;
  88.  
  89. typedef TInstProp TInstPropList[1024];
  90.  
  91. typedef TInstPropList *PInstPropList;
  92.  
  93. class __declspec(delphiclass) TPropertyEditor;
  94. typedef void __fastcall (__closure *TGetPropEditProc)(TPropertyEditor* Prop);
  95.  
  96. class __declspec(pascalimplementation) TPropertyEditor : public System::TObject
  97. {
  98.     typedef System::TObject inherited;
  99.     
  100. private:
  101.     TFormDesigner* FDesigner;
  102.     TInstPropList *FPropList;
  103.     int FPropCount;
  104.     __fastcall TPropertyEditor(TFormDesigner* ADesigner, int APropCount);
  105.     System::AnsiString __fastcall GetPrivateDirectory(void);
  106.     void __fastcall SetPropEntry(int Index, Classes::TComponent* AInstance, Typinfo::PPropInfo APropInfo
  107.         );
  108.     
  109. protected:
  110.     Typinfo::PPropInfo __fastcall GetPropInfo(void);
  111.     Extended __fastcall GetFloatValue(void);
  112.     Extended __fastcall GetFloatValueAt(int Index);
  113.     Sysutils::TMethod __fastcall GetMethodValue(void);
  114.     Sysutils::TMethod __fastcall GetMethodValueAt(int Index);
  115.     long __fastcall GetOrdValue(void);
  116.     long __fastcall GetOrdValueAt(int Index);
  117.     System::AnsiString __fastcall GetStrValue(void);
  118.     System::AnsiString __fastcall GetStrValueAt(int Index);
  119.     System::Variant __fastcall GetVarValue(void);
  120.     System::Variant __fastcall GetVarValueAt(int Index);
  121.     void __fastcall Modified(void);
  122.     void __fastcall SetFloatValue(Extended Value);
  123.     void __fastcall SetMethodValue(const Sysutils::TMethod &Value);
  124.     void __fastcall SetOrdValue(long Value);
  125.     void __fastcall SetStrValue(const System::AnsiString Value);
  126.     void __fastcall SetVarValue(const System::Variant &Value);
  127.     
  128. public:
  129.     __fastcall virtual ~TPropertyEditor(void);
  130.     virtual void __fastcall Activate(void);
  131.     virtual bool __fastcall AllEqual(void);
  132.     virtual void __fastcall Edit(void);
  133.     virtual TPropertyAttributes __fastcall GetAttributes(void);
  134.     Classes::TComponent* __fastcall GetComponent(int Index);
  135.     virtual int __fastcall GetEditLimit(void);
  136.     virtual System::AnsiString __fastcall GetName(void);
  137.     virtual void __fastcall GetProperties(TGetPropEditProc Proc);
  138.     Typinfo::PTypeInfo __fastcall GetPropType(void);
  139.     virtual System::AnsiString __fastcall GetValue(void);
  140.     virtual void __fastcall GetValues(Classes::TGetStrProc Proc);
  141.     virtual void __fastcall Initialize(void);
  142.     void __fastcall Revert(void);
  143.     virtual void __fastcall SetValue(const System::AnsiString Value);
  144.     bool __fastcall ValueAvailable(void);
  145.     __property TFormDesigner* Designer = {read=FDesigner, nodefault};
  146.     __property System::AnsiString PrivateDirectory = {read=GetPrivateDirectory, nodefault};
  147.     __property int PropCount = {read=FPropCount, nodefault};
  148.     __property System::AnsiString Value = {read=GetValue, write=SetValue, nodefault};
  149. public:
  150.     /* TObject.Create */ __fastcall TPropertyEditor(void) : System::TObject() { }
  151.     
  152. };
  153.  
  154. typedef System::TMetaClass*TPropertyEditorClass;
  155.  
  156. class __declspec(delphiclass) TOrdinalProperty;
  157. class __declspec(pascalimplementation) TOrdinalProperty : public TPropertyEditor
  158. {
  159.     typedef TPropertyEditor inherited;
  160.     
  161. public:
  162.     virtual bool __fastcall AllEqual(void);
  163.     virtual int __fastcall GetEditLimit(void);
  164. public:
  165.     /* TPropertyEditor.Destroy */ __fastcall virtual ~TOrdinalProperty(void) { }
  166.     
  167. public:
  168.     /* TObject.Create */ __fastcall TOrdinalProperty(void) : Dsgnintf::TPropertyEditor() { }
  169.     
  170. };
  171.  
  172. class __declspec(delphiclass) TIntegerProperty;
  173. class __declspec(pascalimplementation) TIntegerProperty : public TOrdinalProperty
  174. {
  175.     typedef TOrdinalProperty inherited;
  176.     
  177. public:
  178.     virtual System::AnsiString __fastcall GetValue(void);
  179.     virtual void __fastcall SetValue(const System::AnsiString Value);
  180. public:
  181.     /* TPropertyEditor.Destroy */ __fastcall virtual ~TIntegerProperty(void) { }
  182.     
  183. public:
  184.     /* TObject.Create */ __fastcall TIntegerProperty(void) : Dsgnintf::TOrdinalProperty() { }
  185.     
  186. };
  187.  
  188. class __declspec(delphiclass) TCharProperty;
  189. class __declspec(pascalimplementation) TCharProperty : public TOrdinalProperty
  190. {
  191.     typedef TOrdinalProperty inherited;
  192.     
  193. public:
  194.     virtual System::AnsiString __fastcall GetValue(void);
  195.     virtual void __fastcall SetValue(const System::AnsiString Value);
  196. public:
  197.     /* TPropertyEditor.Destroy */ __fastcall virtual ~TCharProperty(void) { }
  198.     
  199. public:
  200.     /* TObject.Create */ __fastcall TCharProperty(void) : Dsgnintf::TOrdinalProperty() { }
  201.     
  202. };
  203.  
  204. class __declspec(delphiclass) TEnumProperty;
  205. class __declspec(pascalimplementation) TEnumProper